package com.csnf.controller;

import com.csnf.service.BorrowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class BorrowContoller {

    @Autowired
    BorrowService borrowService;

    //借阅
    @RequestMapping("/borrow")
    public String borrow(Integer bookId, Integer userId) {
        borrowService.borrowBook(bookId, userId);
        //调用服务
        return "借阅成功";
    }

}
